package model.map;

import java.util.LinkedList;
import java.util.Queue;

import model.entity.Entity;


/**
 * Defines the abstract concept of a MapTile state.
 * @author Zachary
 */
public abstract class MapTileState {
	private static String shroudedGraphicID;
	private static Entity avatar;
	
	protected GameMap map;
	protected MapPoint point;
	
	private Queue<String> pulledData;
	/**
	 * Constructor for a MapTileState.
	 * @param graphicID
	 */
	protected MapTileState(GameMap map, MapPoint point){
		this.pulledData = new LinkedList<String>();
		this.map = map;
		this.point = point;
	}
	
	/**
	 * Pulls the correct data from the map.
	 * @param map
	 * @return
	 */
	public abstract Queue<String> pullDataFromMap();
	
	/**
	 * Switches the MapTileState.
	 * @return
	 */
	public abstract void updateState();
	
	/**
	 * Returns the name of the state.
	 * @return
	 */
	public abstract String getName();
	
	/**
	 * Returns the graphic ID for the shroud.
	 * @return
	 */
	public String getShroudedGraphicID(){
		return shroudedGraphicID;
	}
	
	/**
	 * Get the pulled data from the map.
	 * @return
	 */
	public Queue<String> getPulledData(){
		return this.pulledData;
	}
	
	/**
	 * Set the pulled data of the state.
	 * @param data
	 */
	public void setPulledData(Queue<String> data){
		this.pulledData = data;
	}
	
	/**
	 * Set the avatar.
	 * @param avatar
	 */
	public static void setAvatar(Entity entity){
		avatar = entity;
	}
	
	/**
	 * Get teh avatar.
	 * @return
	 */
	public Entity getAvatar(){
		return avatar;
	}
	
	/**
	 * Set the shrouded graphic ID.
	 * @param string
	 */
	public static void setShroudedGraphicID(String string){
		shroudedGraphicID = string;
	}
}
